<template>
	<div class="header">
		<button type="button" class="back" @click="toback">back</button>
		<slot></slot>
	</div>
</template>

<script>
	export default{
		methods:{
			toback(){
				this.$router.back()
			}
		}
	}
</script>

<style>
	.header{
		background-color: white;
		position: fixed;
		text-align: center;
		width: 100%;
		line-height: 2rem;
		height: 2rem;
	}
	.back{
		position: fixed;
		background: transparent;
		outline: none;
		color: black;
		border: none;
		font-weight: bold;
		top: 0.4rem;
		left: 0;
	}
</style>
